Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: demo relative path also need to share #2190

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

Jinbao1001
Copy link
Member

@Jinbao1001 Jinbao1001 commented Aug 23, 2024

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

💡 需求背景和解决方案 / Background or solution

demo 共享 deps, 引入相对路径时, 忽略了相对路径可能最终 resolve 的 path 是一致的, 对于这种情况也需要共享, 否则依赖引入会缺失.

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English demo relative path also need to share
🇨🇳 Chinese demo 共享相对路径引入依赖

Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 9:15am

if (key !== entryFileName && !isRelativePath(key)) {
if (shareDepsMap[key]) {
demoDepsMap[demo.id][key] = shareDepsMap[key];
if (key !== entryFileName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改完似乎前后不等价,修改前 entryFileName 会进 demoDepsMap,修改后不会了,但应该修改前是不符合预期的

Ps: 感觉这里的逻辑看起来有点吃力,可能前面 PR 忘了,建议补点注释

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对 ,修改前有问题~, 好的, 我后面补充上来~

@Jinbao1001 Jinbao1001 merged commit 7b51096 into master Aug 23, 2024
10 checks passed
@Jinbao1001 Jinbao1001 deleted the fix/relative-import-repeat branch August 23, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants